/* 表格卡片Demo页面样式 */
.page-header {
    background: #fff;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.page-header:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.page-title {
    margin: 0;
    color: #262626;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    color: #1890ff;
    font-size: 28px;
}

.page-subtitle {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.cards-container {
    min-height: 400px;
    transition: all 0.3s ease;
}

/* 控制面板样式 */
.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.card-title {
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: #28a745;
}

/* 按钮组样式 */
.btn-group .btn {
    margin-right: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.btn-group .btn.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
    z-index: 2;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-group .btn:active {
    transform: translateY(0);
}

/* 按钮动效 */
.btn-group .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-group .btn:hover::before {
    left: 100%;
}

/* 表单控件样式 */
.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 0.2rem rgba(24, 144, 255, 0.25);
    transform: translateY(-1px);
}

/* 加载状态 */
.cards-container.loading {
    position: relative;
    pointer-events: none;
}

.cards-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

.cards-container.loading::after {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    font-size: 16px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 错误状态 */
.error-message {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    color: #a8071a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message i {
    color: #ff4d4f;
    font-size: 18px;
}

/* 成功状态 */
.success-message {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    color: #389e0d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message i {
    color: #52c41a;
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-title i {
        font-size: 24px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group .btn {
        margin-right: 0;
        width: 100%;
    }
    
    .row .col-md-8,
    .row .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 12px;
    }
    
    .page-title {
        font-size: 18px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .page-subtitle {
        text-align: center;
        font-size: 13px;
    }
    
    .card-body {
        padding: 12px;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .page-header {
        background: #1f1f1f;
        color: #fff;
    }
    
    .page-title {
        color: #fff;
    }
    
    .page-subtitle {
        color: #ccc;
    }
    
    .card-header {
        background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
        border-bottom-color: #333;
    }
    
    .card-title {
        color: #fff;
    }
    
    .form-control {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .form-control:focus {
        border-color: #1890ff;
        background: #333;
    }
    
    .form-group label {
        color: #ccc;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header,
.card {
    animation: fadeInUp 0.6s ease-out;
}

.btn-group .btn {
    animation: fadeInUp 0.6s ease-out;
}

.btn-group .btn:nth-child(1) { animation-delay: 0.1s; }
.btn-group .btn:nth-child(2) { animation-delay: 0.2s; }
.btn-group .btn:nth-child(3) { animation-delay: 0.3s; }
.btn-group .btn:nth-child(4) { animation-delay: 0.4s; }
.btn-group .btn:nth-child(5) { animation-delay: 0.5s; }

/* 卡片容器动画 */
.cards-container > * {
    animation: fadeInUp 0.8s ease-out;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 工具提示样式 */
.tooltip-custom {
    position: relative;
    cursor: help;
}

.tooltip-custom::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-custom:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
} 